package com.xiangdao.model;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Message {
    private int id;
    private String content;
    private Date time;

    private Integer user_id;
    private Integer shareProduct_id;
    private Integer postSecond_id;

    private PostSecond postSecond;
    private ShareProduct shareProduct;
    private User user;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public PostSecond getPostSecond() {
        return postSecond;
    }

    public void setPostSecond(PostSecond postSecond) {
        this.postSecond = postSecond;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public ShareProduct getShareProduct() {
        return shareProduct;
    }

    public Integer getUser_id() {
        return user_id;
    }

    public void setUser_id(Integer user_id) {
        this.user_id = user_id;
    }

    public Integer getShareProduct_id() {
        return shareProduct_id;
    }

    public void setShareProduct_id(Integer shareProduct_id) {
        this.shareProduct_id = shareProduct_id;
    }

    public Integer getPostSecond_id() {
        return postSecond_id;
    }

    public void setPostSecond_id(Integer postSecond_id) {
        this.postSecond_id = postSecond_id;
    }

    public void setShareProduct(ShareProduct shareProduct) {
        this.shareProduct = shareProduct;
    }



    public String displayParsedDate() {
        SimpleDateFormat formatter=new SimpleDateFormat("yyyy-MM-dd");
        return formatter.format(this.time);
    }
}
